home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Source Code / By the Book / Learn C++ (CodeWarrior) / Chap 08.04 - formatter / formatter.cp < prev    next >
Text File  |  1995-10-21  |  446b  |  29 lines

  1. #include <iostream.h>
  2.  
  3.  
  4. //---------------------------------------  main()
  5.  
  6. int    main()
  7. {
  8.     cout << 202 << '\n';
  9.     
  10.     cout.width( 5 );
  11.     cout.fill( 'x' );
  12.     cout.setf( ios::left, ios::adjustfield );
  13.     
  14.     cout << 202 << '\n';
  15.     
  16.     cout.width( 10 );
  17.     cout.fill( '=' );
  18.     cout.setf( ios::internal, ios::adjustfield );
  19.     
  20.     cout << -101 << '\n';
  21.     
  22.     cout.width( 10 );
  23.     cout.fill( '*' );
  24.     cout.setf( ios::right, ios::adjustfield );
  25.     
  26.     cout << "Hello";
  27.     
  28.     return 0;
  29. }